﻿<Window x:Class="DTC.Popups.ManufacturerPopup"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Valid="clr-namespace:DTC.Validations"
        Title="ManufacturerPopup" Height="300" Width="300"
        Style="{StaticResource PopupWindow}" Closing="Window_Closing">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="../Resources/TextEditStyles.xaml"/>
                <ResourceDictionary Source="../Resources/TextBlockStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <StackPanel Name="MainGrid" Margin="15" VerticalAlignment="Center">
        <TextBlock Text="Название компании:"/>
        <TextBox Name="ManufacturerTextBox"
                 Margin="5,10,0,0">
            <TextBox.Text>
                <Binding Path="Name" Mode="TwoWay" NotifyOnValidationError="True"
                                 UpdateSourceTrigger="PropertyChanged">
                    <Binding.ValidationRules>
                        <Valid:EmptyValidate/>
                    </Binding.ValidationRules>
                </Binding>
            </TextBox.Text>
        </TextBox>
        <TextBlock Text="Страна:"
                   Margin="0,15,0,0"/>
        <TextBox Text="{Binding Path=Country}" Name="CountryTextBox"
                 Margin="5,10,0,0"/>
    </StackPanel>
</Window>
